<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>定位</title>
  <style>
    /* 设置盒子宽度和图片宽度一致 */
    div{
      position: relative;
      width: 400px;
      height: 350px;
      background-color: aliceblue;
    }

    img{
      width: 400px;
    }
    span{
      position: absolute;
      top: 0;
      right: 0;
    }
  </style>
</head>
<body>
  <div>
    <img src="./images/asset-logoIco.png" alt="">
    <span>图标</span>
    <strong>绝对定位</strong>
  </div>
</body>
</html>